package cn.com.connext.scrm.domain.master;

import com.connext.common.domain.UUIDDomain;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Date;

@Entity
@Table(name = "teacher")
public class Teacher implements UUIDDomain, Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private String id;

    @NotNull
    @Column(name = "mobile", nullable = false, length = 20)
    @Size(max = 20)
    private String mobile;

    @NotNull
    @Column(name = "nick_name", nullable = false, length = 50)
    @Size(max = 50)
    private String name;

    @Column(name = "english_name", length = 50)
    private String englishName;

    @Column(name = "wechat_id")
    private String wechatId;

    @Column(name = "title")
    private String title;

    @Column(name = "english_title")
    private String englishTitle;

    @Column(name = "birth")
    private Date birth;

    @Column(name = "lesson")
    @Size(max = 50)
    private String lesson;

    @Column(name = "create_time")
    private ZonedDateTime createTime;

    @Column(name = "update_time")
    private ZonedDateTime updateTime;

    @Column(name = "created_index")
    private Long createdIndex;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEnglishName() {
        return englishName;
    }

    public void setEnglishName(String englishName) {
        this.englishName = englishName;
    }

    public String getWechatId() {
        return wechatId;
    }

    public void setWechatId(String wechatId) {
        this.wechatId = wechatId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getEnglishTitle() {
        return englishTitle;
    }

    public void setEnglishTitle(String englishTitle) {
        this.englishTitle = englishTitle;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public String getLesson() {
        return lesson;
    }

    public void setLesson(String lesson) {
        this.lesson = lesson;
    }

    public ZonedDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(ZonedDateTime createTime) {
        this.createTime = createTime;
    }

    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreatedIndex() {
        return createdIndex;
    }

    public void setCreatedIndex(Long createdIndex) {
        this.createdIndex = createdIndex;
    }

    @Override
    public String toString() {
        return "Teacher{" +
            "id='" + id + '\'' +
            ", mobile='" + mobile + '\'' +
            ", name='" + name + '\'' +
            ", englishName='" + englishName + '\'' +
            ", wechatId='" + wechatId + '\'' +
            ", title='" + title + '\'' +
            ", englishTitle='" + englishTitle + '\'' +
            ", birth=" + birth +
            ", lesson='" + lesson + '\'' +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", createdIndex=" + createdIndex +
            '}';
    }
}
